import java.io.Serializable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

public class AA implements Serializable {
    public static void main(String[] args) {

        ExecutorService executorService = Executors.newFixedThreadPool(8);



        ThreadFactory threadFactory = Executors.defaultThreadFactory();

        threadFactory.newThread(() -> {

            System.out.println("xxx");
            throw new RuntimeException("xxx");
        });



        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

    }
}
